package com.jdpc.weparty.service.user

import com.jdpc.weparty.controller.vo.UserVo
import com.jdpc.weparty.entity.User

data class UserInfo(
        var phoneNumber: String,
        var userName: String,
        var gender: String,
        var age: Int,
        var userNumber: String,
        var avatar: String
)

fun generateUserInfo(userVo: UserVo): UserInfo {
    return UserInfo(
            userVo.phoneNumber,
            userVo.userName,
            userVo.gender,
            userVo.age,
            userVo.userNumber,
            userVo.avatar

    )
}

fun generateUserInfo(user: User): UserInfo {
    return UserInfo(
            user.phoneNumber,
            user.userName,
            user.gender,
            user.age,
            user.userNumber,
            user.avatar
    )
}